<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Binary large objects (BLOBs): GNOME Data Access 5 manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GNOME Data Access 5 manual">
<link rel="up" href="ch04.html" title="Foreword about abstraction">
<link rel="prev" href="gen_sql_identifiers.html" title="SQL identifiers">
<link rel="next" href="installation.html" title="Installation">
<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts"></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch04.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="gen_sql_identifiers.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="installation.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="gen_blobs"></a>Binary large objects (BLOBs)</h2></div></div></div>
<p>
	  Binary large objects (BLOBs) are potentially very big (several GigaBytes) pieces of binary
	  data which databases can store. Because of their potential size, they are not manipulated
	  like any other data, and are usually not transfered to the database engine at the same time
	  as the SQL text is transfered: first
	  a reference to a blob is created for an existing or a new blob, and then
	  that reference is used, <span class="emphasis"><em>before or after the statement is being executed,
	    depending on the database engine accessed</em></span>, to get or set some parts of the blob.
	</p>
<p>
	  <span class="application">Libgda</span> makes its best to hide the complexity of this and most of the time blobs can be used
	  like any other type of values with the following limitations:
	  </p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>When getting a blob through a SELECT statement, a transaction will automatically
		be started if it's not already started, and usually the transaction (implicitly or explicitly)
		will be locked untill all the ressources associated to the fetched blobs are liberated (by
		calling <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref()</a> on the model).</p></li>
<li class="listitem"><p>When fetching a blob value (using
		gda_data_model_get_value_at() for example), the blob
		itself is not fetched, only a reference to the blob is fetched, and one has to use the
		<a class="link" href="GdaBlobOp.html" title="Blobs">GdaBlobOp</a> object embedded in a blob value to get the blob's
		contents.</p></li>
</ul></div>
<p>
	</p>
<p>
	  Please consult each database provider's <a class="link" href="provider-notes.html" title="Provider's notes">notes</a> and
	  <a class="link" href="limitations.html" title="Limitations">limitations</a> for database specific rules
	  regarding BLOBs. Also have a look at the
	  <a class="link" href="blobs_example.html" title="Binary large objects (BLOBs) example">Blobs manipulation source code example</a>.
	</p>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.32</div>
</body>
</html>